home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
726-750
/
744
/
fo2
/
sources_fo2
/
misc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-18
|
937b
|
55 lines
#include "defs.h"
Prototype D2Str(ULONG decimal);
Prototype putIText(BYTE *text);
Prototype printCYL(LONG cyl);
extern BYTE BufferD2Str[];
extern struct Gadget Gadget17;
extern struct Gadget Gadget18;
D2Str(decimal)
ULONG decimal;
{
BYTE *string,n;
ULONG m,a_enlever;
BOOL init=1;
string=&BufferD2Str[0];
m=1000000000;
init=1;
for (n=0 ; n!=10 ;n++)
{
a_enlever=(0xFF & (decimal/m));
string[n]=a_enlever + '0';
string[n+1]='\0';
decimal -= a_enlever*m;
m/=10;
if (!m) break;
if (string[n]=='0' && init) n--;
else init=0;
}
}
putIText(text)
BYTE *text;
{
RemoveGList(FOWin,&Gadget18,1);
Gadget18.GadgetText->IText=text;
AddGList(FOWin,&Gadget18,18,1,0);
RefreshGList(&Gadget18,FOWin,0,1);
}
printCYL(cyl)
LONG cyl;
{
RemoveGList(FOWin,&Gadget17,1);
D2Str(cyl);
if (BufferD2Str[1]==0) {BufferD2Str[1]=' '; BufferD2Str[2]=0;}
AddGList(FOWin,&Gadget17,18,1,0);
RefreshGList(&Gadget17,FOWin,0,1);
}